package org.neuedu.chapter04_0616;

public class Practice06 {
    public static void main(String[] args) {
        // 将一个数组中的元素逆序存放
        int[] arr1 = new int[]{1, 2, 3, 4, 5};
        int[] arr2 = new int[arr1.length];
        int index = 0;

        for (int i = arr1.length - 1; i >= 0 ; i--) {
            arr2[index] = arr1[i];
            index++;
        }

        for (int i : arr2) {
            System.out.println(i);
        }
    }
}
